<?php
/**
 *  💡 免责声明：本软件不得用于商业用途，仅做学习交流
 *  ⚠️ 权利声明：本软件由版权人提供产品技术支持
 *  📅 项目编号：NX2025-0135
 */
namespace App\Console;

use App\Console\Commands\CheckGroupOrder;
use App\Console\Commands\CommodityRecycling;
use App\Console\Commands\DailyAutoDividends;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;

class Kernel extends ConsoleKernel
{
    /**
     * Define the application's command schedule.
     */
    protected function schedule(Schedule $schedule)
    {
        // $schedule->command('inspire')->hourly();
        $schedule->command(CheckGroupOrder::class)->everyMinute()->runInBackground();
//        $schedule->command(CheckGroupOrderSessionActive::class)->everyMinute()->runInBackground();
//        $schedule->command(CloseExpiredOrders::class)->everyMinute()->runInBackground();
//        $schedule->command(CheckImOnline::class)->everyFiveMinutes()->runInBackground();

//        $schedule->command(DailyInitGroupOrderSessions::class)->daily()->runInBackground();
        $schedule->command(DailyAutoDividends::class)->daily()->runInBackground(); //分红
        $schedule->command(CommodityRecycling::class)->dailyAt('23:00')->runInBackground(); //商品回收
//        $schedule->command(DailyBeanPackage::class)->daily()->runInBackground();
//        $schedule->command(DailyBeenReleases::class)->dailyAt('01:00')->runInBackground();
//        $schedule->command(ClearTheMembershipLevel::class)->daily()->runInBackground(); 以改为监听模型observer
    }

    /**
     * Register the commands for the application.
     */
    protected function commands()
    {
        $this->load(__DIR__ . '/Commands');

        require base_path('routes/console.php');
    }
}
